<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/jsp/common/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>${table.comment!}</title>
</head>
<body>
<div class="page-content">
	<div class="page-header no-padding-bottom no-padding-top">
		<div class="row">
            <div class="col-xs-12">
            	<div class="col-sm-12 header lighter no-margin-bottom no-border">
            		<h5 class="margin-13">
						${table.comment!}
					</h5>
            	</div>
            </div>
        </div>
  	</div>
	<div class="header content-15 no-padding-bottom">
		<div class="row">
            <div class="col-xs-12">
            <form class="form-horizontal" role="form" id="search${vo}Form" onkeydown="if(event.keyCode==13)return false;">
            	<input type="hidden" name="page" id="page" value="${r'${cacheSearchParams.page}'}"/>
				<input type="hidden" name="rows" id="rows" value="${r'${cacheSearchParams.rows}'}"/>
				<#list table.fields as field>
					<#if field_index % 3 == 0>
					<#if field_index != 0>
					</div>
					</#if>
					<div class="form-group">
					</#if>
						<div class="col-sm-4 no-padding-right">
							<label class="col-xs-3 control-label  no-padding-left"><#if field.comment??>${field.comment}<#else>${field.propertyName}</#if></label>
<#if field.type?contains('time')>
							<input type="text" name="${field.propertyName}" value="${r'$'}{cacheSearchParams.${field.propertyName }}" class="col-xs-10 col-sm-6" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
<#elseif field.type == 'date'>
							<input type="text" name="${field.propertyName}" value="${r'$'}{cacheSearchParams.${field.propertyName }}" class="col-xs-10 col-sm-6" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>
<#else>
							<input type="text" name="${field.propertyName}" value="${r'$'}{cacheSearchParams.${field.propertyName }}" class="col-xs-10 col-sm-6"/>
</#if>
						</div>
					<#if !field_has_next>
					</div>
					</#if>
				</#list>
	             <div class="form-group">
	                <div class="col-xs-12">
	                	<div class="col-sm-12 align-center">
			                <button  type="button" class="btn btn-xs btn-info radius-3" onclick="get${vo}s(1)">
			                   	 搜索
			                </button>
			                <button type="button" class="btn btn-xs btn-primary radius-3" onclick="loadOther('${r'$'}{ctx}<#if package.ModuleName??>/${package.ModuleName}</#if>/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.voPath}</#if>/index.action');">
			                     重置
			                </button>
		                </div>
	            	</div>
            	</div>
            </form>
        </div>
    </div>
	</div>
	<div class="row">
            <div class="col-xs-12">
                <div class="row no-margin-top">
                    <div class="col-sm-6" id="cntInfo"></div>
                    <div class="col-sm-6 dataTables_paginate">
                        <a class="btn btn-minier btn-info radius-3" href="javascript:void(0)" onclick="loadOther('${r'$'}{ctx}<#if package.ModuleName??>/${package.ModuleName}</#if>/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.voPath}</#if>/add.action')">
	                       	新建
	                    </a>
                    </div>
                </div>
                <div class="row">
		            <div class="col-xs-12">
		                <div id="${vo?uncap_first}sDiv" class="table-responsive" style="background: #fff;">
		                </div>
	            	</div>
	        	</div>
            </div>
        </div>
</div>
<script type="text/javascript">
	$(function () {
		get${vo}s();
	});

	function get${vo}s(pageNum){
		if (parseInt(pageNum)) {
			$("#page").val(pageNum);
		}
        $("#${vo?uncap_first}sDiv").load("${r'$'}{ctx}<#if package.ModuleName??>/${package.ModuleName}</#if>/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.voPath}</#if>/list.action?cacheSearchId=${r'${cacheSearchId}'}", ${'$("#search${vo}Form").serialize()'});
	}
</script>
</body>
</html>